package com.study.djl.provider.integration;


import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.messaging.handler.annotation.SendTo;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

@Component
@Slf4j
@Transactional
public class HelloListener {

    @StreamListener(ConsumerInt.HELLO)
    @SendTo(ConsumerInt.RETURN_HELLO)
    public String processNewOrder(String name) {
        log.info("hello {} ,I am kafka provider!", name);
        return name;
    }
}
